package com.itheima.order.controller;

import com.itheima.order.domain.Orders;
import com.itheima.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author fanYuLe
 * @Date 2023/3/25 15:52
 * @Blog blog.fanYuLe.net/996.mba
 * @Description:
 */
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    //创建一个订单
    @PostMapping("/order/submit")
    public String submit(@RequestBody Orders orders){
        orderService.submit(orders);
        return "success";
    }
}

